//引入mongoose
let mongoose=require('mongoose');
//创建目标集合模型对象
let exercisesSchema=mongoose.Schema({
    topics:String,
    options:Array,
    answer:Array,
    analysis:String,
    type:Number,
    score:{
        type:Number,
        default:3
    },
    pointId:{
        type:mongoose.SchemaTypes.ObjectId,
        ref:'pointsModel'
    }
    
});
//建立目标模型对象与目标集合的关联关系
mongoose.model('exercisesModel',exercisesSchema,'exercises');